package com.lz.ovuola.util.redis.single;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;

/**
 * 
 * @author fz
 *
 */
@Configuration
public class JedisSingleConnectionFactoryConfig {

	@Qualifier("redisSingleConnectionFactory")
	@Bean(name = "redisSingleConnectionFactory")
	public RedisConnectionFactory connectionFactory() {
		JedisConnectionFactory jedisConnectionFactory = new JedisConnectionFactory();
		jedisConnectionFactory.setHostName("127.0.0.1");
		jedisConnectionFactory.setPort(6379);
		return jedisConnectionFactory;
	}
}